Most modern computer systems are multi-tasking systems. That is, they allow more than one "job" or "process" to be active at a given time. Since there is often only one processor in the system (or a number of processors less than the number of jobs/processes), it becomes necessary for the jobs/processes to share the processor resources. In a shared processor system, a processor spends some time executing part of a first job/process before switching to execute part of another job/process. Thus, to a human user, it appears that more than one job/process is being executed at a given time.
When multiple applications, processes, or jobs are sharing one or more processors in a computer system, an equitable method of processor sharing needs to be determined. For instance, Job A might be twice as urgent as Job B. As another example, if User X and User Y share a computer system and User X pays a fee three times as much as User Y pays, then User X wants to be allocated three times more processor resources than User Y.
Moreover, some computer systems execute "multi-threaded" computer programs in which multiple "threads" of a process can be executing at the same time. Multi-threading adds an extra note of complexity to the operating system and to processor sharing.
As an example, many conventional operating systems use a priority-based approach to allocate jobs, threads, users, or processes to one or more processors. Thus, jobs having the highest priority execute before jobs having a lower priority. In some conventional operating systems, a high priority job will run until it is done before a lower priority job gets to run.
In at least one implementation of the Solaris operating system (available from Sun Microsystems, Inc), a highest priority job will run for a period of time and then its priority is redetermined. There are currently four different scheduling classes that define the priorities of the applications in a conventional Solaris system: Real Time (RT); System (SYS); Interactive (IA), and Timesharing (TS). If, after its execution, a job still has the highest priority in the system, it is allowed to run for another period of time (e.g., between 20 to 200 milliseconds), after which the priority is redetermined again. If it is no longer the highest priority job in the system after the redetermination, then a job that has a higher priority gets to run. Unfortunately, if a job maintains a highest priority, other applications do not always get a chance to execute.